When using dynamic workspaces, a new workspace will be appended
when moving a window down to the last (empty) workspace. It makes
sense to extend the behavior in the opposite direction, and prepend
a new workspace when moving a window up from the first workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=665764
direction = Meta.MotionDirection.DOWN;
newWs = screen.get_workspace_by_index(screen.n_workspaces - 1);
} else if (isNaN(target)) {
+ // Prepend a new workspace dynamically
+ if (screen.get_active_workspace_index() == 0 &&
+ action == 'move' && target == 'up')
+ this.insertWorkspace(0);
+
direction = Meta.MotionDirection[target.toUpperCase()];
newWs = screen.get_active_workspace().get_neighbor(direction);
} else if (target > 0) {